﻿<UserControl x:Class="myManga.Views.SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:base="clr-namespace:myManga.Base"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             Background="Black"
             Foreground="White"
             TextElement.Foreground="White"
             TextElement.FontFamily="Segoe UI">
    <UserControl.Resources>
        <ObjectDataProvider 
            x:Key="ChapOrdEnum"
            MethodName="GetValues"
            ObjectType="{x:Type sys:Enum}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="base:ChapterOrder" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </UserControl.Resources>
    <ScrollViewer>
        <StackPanel Orientation="Vertical">
            <HeaderedContentControl
                Margin="10,10,10,5"
                Header="Window">
                <StackPanel>
                    <CheckBox 
                        IsChecked="{Binding ChangeLastWindowState}" 
                        Content="Update Window State"
                        Foreground="White" 
                        Style="{StaticResource MetroWhiteCheckBox}" />
                </StackPanel>
            </HeaderedContentControl>
            <HeaderedContentControl
                Margin="10,5"
                Header="Display">
                <StackPanel>
                    <CheckBox Margin="0,0,0,1"
                        IsChecked="{Binding DrawShadows}" 
                        Content="Draw Shadows"
                        Foreground="White" 
                        Style="{StaticResource MetroWhiteCheckBox}" />
                    <CheckBox Margin="0,0,0,1"
                        IsChecked="{Binding FadeImages}" 
                        Content="Fade Images"
                        Foreground="White" 
                        Style="{StaticResource MetroWhiteCheckBox}" />
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="Chapter Order: " Padding="5,0,0,0"/>
                        <ComboBox ItemsSource="{Binding Source={StaticResource ChapOrdEnum}}" SelectedItem="{Binding Path=ChapterListOrder}" Grid.Column="1" />
                    </Grid>
                </StackPanel>
            </HeaderedContentControl>
            <HeaderedContentControl
                Margin="10,5"
                Header="Reading">
                <StackPanel>
                    <CheckBox 
                        IsChecked="{Binding AutoDownload}" 
                        Content="Auto download next chapter. (If present)"
                        Foreground="White" 
                        Style="{StaticResource MetroWhiteCheckBox}" />
                    <CheckBox 
                        IsChecked="{Binding AutoClean}" 
                        Content="Auto clean previous chapters. (Deletes previous chapter.)"
                        Foreground="White" 
                        Style="{StaticResource MetroWhiteCheckBox}" />
                </StackPanel>
            </HeaderedContentControl>
        </StackPanel>
    </ScrollViewer>
</UserControl>
